home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 39 / 039.d81 / envelope master (.txt) < prev    next >
Commodore BASIC  |  2022-08-26  |  6KB  |  202 lines

  1. 10 poke 53280,0:poke 53281,0:print"[147][149]":dim a$(7)
  2. 30 gosub 60500
  3. 50 :
  4. 60 print"[147]":printtab(8)" decimal equivelents [146][154]":print:size=0
  5. 70 restore:for x=1 to 7:read a$(x):next x
  6. 80 for x=1 to 7:size=size+.125:printtab(14)a$(x);"=";size:next x
  7. 90 print"[150] please enter the envelops measurements"
  8. 100 print"in decimal. if uncertain, please check.[153]"
  9. 105 print"standard bussiness envelope = 9 x 4.5"
  10. 120 print"[129]enter the envelope's width [152]:";:nu=1:gosub61000:ew=val(a$)
  11. 125 ifa$="" then print"[145][145]";:goto120
  12. 130 print"[156]enter the envelope's height [152]:";:nu=1:gosub 61000:eh=val(a$)
  13. 135 ifa$="" then print"[145][145]";:goto130
  14. 140 print"[147]             return address             "
  15. 141 print"enter your choice of return addresses"
  16. 142 print" 1[152])[150] commodore magazine
  17. 143 [153]" 2print#) printloadstar magazine"
  18. 144 [153]" 3print#) cont'other'"
  19. 145 [153]"openenter selection print#(cont1-3,0=abortprint#) :";:nu[178]1:[141] 61000
  20. 146 [139]a$[178]"0" [167] [141]62000 :[137] 140
  21. 147 [139] a$[178]"1" [167] 760
  22. 148 [139] a$[178]"2" [167] 790
  23. 149 [139] a$[179][177]"3" [167]140
  24. 150 [153]"load             return address             "
  25. 155 [153]"print# from list(nameprint#)  print# :";:nu[178]0:[141]61000:rn$[178]a$
  26. 185 [139]a$[178]""[167][141]62000:[137]150
  27. 190 [153]"print#closefrom list(foraddresslist)print#:";:[141]61000:ra$[178]a$
  28. 191 [139]a$[178]""[167][141]62000:[137]150
  29. 195 [153]"print# from list(syscitylist)   print#:";:[141]61000:rc$[178]a$
  30. 196 [139]a$[178]""[167][141]62000:[137]150
  31. 200 [153]"print# from list(statelist)  print#:";:[141]61000:rs$[178]a$
  32. 201 [139]a$[178]""[167][141]62000:[137]150
  33. 205 [153]"print# from list(contziplist)    print#:";:[141]61000:rz$[178]a$
  34. 206 [139]a$[178]""[167][141]62000:[137]150
  35. 210 [153]"load":
  36. 211 [153]"load             return address             "
  37. 212 [153]" name     print#:list";rn$
  38. 213 [153]" foraddress  print#:list";ra$
  39. 214 [153]" syscity     print#:list";rc$
  40. 215 [153]" state    print#:list";rs$
  41. 217 [153]" contzip code print#:list";rz$
  42. 220 [153]"is this correct (y/n):";:nu[178]0:[141]61000:an$[178]a$:[139]a$[178]""[167] 210
  43. 225 [139] an$[178]"y" [167] 230
  44. 226 [139] an$[178]"n" [167] 140
  45. 227 [137] 210
  46. 230 [153]"load            sending address             "
  47. 231 [153]"enter your choice of sending addresses"
  48. 232 [153]" 1print#)def commodore magazine
  49. 233 print" 2[152]) [153]loadstar magazine"
  50. 234 print" 3[152]) [154]'other'"
  51. 235 print"[159]enter selection [152]([154]1-3,0=abort[152]) :";:nu=1:gosub 61000
  52. 236 ifa$="0" then gosub62000:goto230
  53. 237 if a$="1" then 820
  54. 238 if a$="2" then 850
  55. 239 if a$<>"3" then230
  56. 250 print"[147]            sending address             "
  57. 255 print"[152]  to  [155](name[152])  [152] :";:nu=0:gosub61000:tn$=a$
  58. 256 ifa$=""thengosub62000:goto 250
  59. 260 print"[152][160] to  [155]([129]address[155])[152]:";:gosub61000:ta$=a$
  60. 261 ifa$=""thengosub62000:goto 250
  61. 265 print"[152]  to  [155]([158]city[155])   [152]:";:gosub61000:tc$=a$
  62. 266 ifa$=""thengosub62000:goto 250
  63. 270 print"[152]  to  [155](state[155])  [152]:";:gosub61000:ts$=a$
  64. 271 ifa$=""thengosub62000:goto 250
  65. 275 print"[152]  to  [155]([154]zip[155])    [152]:";:gosub61000:tz$=a$
  66. 276 ifa$=""thengosub62000:goto 250
  67. 280 print"[147]":
  68. 281 print"[147]             sending address            "
  69. 282 print" name     [152]:[155]";tn$
  70. 283 print" [129]address  [152]:[155]";ta$
  71. 284 print" [158]city     [152]:[155]";tc$
  72. 285 print" state    [152]:[155]";ts$
  73. 287 print" [154]zip code [152]:[155]";tz$
  74. 290 print"is this correct (y/n):";:nu=0:gosub61000:an$=a$:ifa$=""then 281
  75. 340 if an$="y" then goto 360
  76. 350 if an$="n" then goto 230
  77. 355 goto 281
  78. 360 print" [147]"
  79. 370 print"is there a lower flag to the address"
  80. 380 print"[154]example[152]: photographs-do not bend"
  81. 390 print"[152] responce[155] ([154]y/n[155]) :";:nu=0:gosub61000:af$=a$
  82. 400 if af$="n"then 420
  83. 405 if af$="y"then 410
  84. 406 goto 360
  85. 410 print"[156]enter the message [155]:";:gosub61000:flag$=a$
  86. 420 print"[147]"
  87. 430 print"[150]    insert[160]the";eh;"x";ew;"envelope"
  88. 440 print"[129]  turn on printer and press [158](return[158])"
  89. 445 print"       [154]or press (space) to abort"
  90. 450 geta$:ifa$=""then 450
  91. 455 ifa$=" "then gosub62000:goto 420
  92. 460 ifa$<>chr$(13) then 450
  93. 470 open 15,4,15:close 15
  94. 480 if st<>0 then print"the printer does not respond ...":goto 440
  95. 490 open 10,4,10:print#10:close 10
  96. 500 :
  97. 510 :
  98. 520 :adj=-1
  99. 530 open4,4
  100. 540 print#4,spc(1);rn$
  101. 550 print#4,spc(1);ra$
  102. 560 print#4,spc(1);rc$;", ";rs$
  103. 570 print#4,spc(1);rz$
  104. 580 gosub 880:rem calculate down to address
  105. 590 for x=1 to da:print#4:next x
  106. 600 gosub 900:rem get longest string
  107. 610 gosub 930:rem calculate spc(#)
  108. 620 print#4,spc(x);tn$
  109. 630 print#4,spc(x);ta$
  110. 640 print#4,spc(x);tc$;", ";ts$
  111. 650 print#4,spc(x);tz$
  112. 660 if af$="y"then gosub 950:rem calculate lines down
  113. 670 for x=1 to dn:print#4:next x
  114. 680 gosub 960:rem calculate spc(x) to center up flag$
  115. 690 print#4,spc(x);flag$
  116. 700 print"[147][150]print another  [152]([154]y/n[152]) :";:gosub61000:an$=a$
  117. 710 if an$="n"then close4:gosub 62000:goto 700
  118. 715 if an$="y"then 720
  119. 717 goto 700
  120. 720 print"[129]same addresses [152]([154]y/n[152]) :";:gosub61000:an$=a$
  121. 730 if an$="y"then close4:goto 490
  122. 735 if an$="n"then close4:goto 60
  123. 740 goto 720
  124. 750 print#4:close 4:end
  125. 760 rem default return address #1
  126. 770 rn$="commodore magazine":ra$="1200 wilson drive":rc$="west chester"
  127. 780 rs$="pa.":rz$="19380":goto 210
  128. 790 rem default return address #2
  129. 800 rn$="loadstar":ra$="p.o. box 30008":rc$="shreveport"
  130. 810 rs$="la":rz$="71130-0008":goto 210
  131. 820 rem default (to) address #1
  132. 830 tn$="commodore magazine":ta$="1200 wilson drive":tc$="west chester"
  133. 840 ts$="pa.":tz$="19380":goto 280
  134. 850 rem default (to) address #2
  135. 860 tn$="loadstar":ta$="p.o. box 30008":tc$="shreveport"
  136. 870 ts$="la":tz$="71130-0008":goto 280
  137. 880 da=int((eh*6)/2)-6:if da<1 then da=0
  138. 890 return
  139. 900 ac=len(tn$):if len(ta$)>ac then ac=len(ta$)
  140. 910 if len(tc$)+len(ts$)+2>ac then ac=len(tc$)+len(ts$)+2
  141. 920 return
  142. 930 x=int((ew*10)/2)+adj-(ac/2):if x<1 then x=0
  143. 940 return
  144. 950 dn=int(da*.6):return
  145. 960 x=int((ew*10)/2)+adj-(len(flag$)/2):if x<1 then x=0
  146. 970 return
  147. 980 data "1/8","1/4","3/8","1/2","5/8","3/4","7/8"
  148. 60500 rem
  149. 60510 print"[147][146]            [158][204] [207] [193] [196] [211] [212] [193] [210]"
  150. 60520 print
  151. 60530 print"           [154][208]roudly presents:"
  152. 60550 print
  153. 60560 print
  154. 60570 print"    [197] [206] [214] [197] [204] [207] [208] [197]   [205] [193] [211] [212] [197] [210]"
  155. 60580 print"    [152][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163]"
  156. 60590 print
  157. 60600 print"                                       "
  158. 60610 print"  By:Jerome E Reuter               [176][174]  "
  159. 60620 print"                                   [173][189]  "
  160. 60630 print"                                       "
  161. 60640 print"                                       "
  162. 60650 print"              LOADSTAR                 "
  163. 60660 print"              P.O. Box 30008           "
  164. 60670 print"              Shreveport, LA           "
  165. 60680 print"              71130-0008               "
  166. 60690 print"                                       "
  167. 60700 print"                                       "
  168. 60710 print"                                       "
  169. 60720 print
  170. 60730 print"      [150]       Copyright 1987        "
  171. 60740 print"                                   "
  172. 60750 print"      [154]        PRESS (SPACE)        ";
  173. 60760 print"";
  174. 60800 geta$:ifa$=""then60800
  175. 60805 ifa$<>" "then60800
  176. 60810 print"[147]";chr$(142):return
  177. 61000 a$="":print"[164]";:fora=1to25
  178. 61005 getb$:ifb$=""then61005
  179. 61010 ifb$=chr$(13) then print"[157] ":return
  180. 61015 ifb$=chr$(20) and a>1 then print"[157][157]  [157][157][164]";:a=a-1:a$=left$(a$,a-1):goto61005
  181. 61020 ifb$=chr$(20) then 61005
  182. 61025 if(a=25)or((nu)and(a=6))then 61005
  183. 61030 ifb$>="0"andb$<="9" then 61070
  184. 61035 ifb$="." then 61070
  185. 61036 if nu=1 then 61005
  186. 61040 ifb$=>"[193]" and b$<="[218]" then 61070
  187. 61045 ifb$<" "or b$>"z" then 61005
  188. 61070 print"[157]"b$;:poke212,.:print"[164]";:a$=a$+b$:next
  189. 62000 prin